<?php
class ContactsController extends AppController {

	var $name = 'Contacts';
	var $uses =array('Contact');
	var $helpers = array('Html','Form','Javascript','Fck');

	function beforeFilter(){
		parent::beforeFilter();
		$this->Auth->allowedActions = array('*');
	}

	function backstage_index() {
        $this->layout='admin';        
		if (!empty($this->data)) {            
				if ($this->Contact->save($this->data)) {
					$this->Session->setFlash(__('Contact Information has been saved.', true));
				} else {
					$this->Session->setFlash(__('Contact Information could not be saved. Please, try again.', true));
				}
			}
        $this->data= $this->Contact->findById("1");
	}

        function index() {
        $this->layout='';        
        return $this->Contact->findById("1");
	}
}
?>